package com.fourforfo.fourmall.ware.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.fourforfo.common.utils.PageUtils;
import com.fourforfo.fourmall.ware.entity.PurchaseEntity;
import com.fourforfo.fourmall.ware.vo.PurchaseDoneVO;
import com.fourforfo.fourmall.ware.vo.PurchaseMergeVO;

import java.util.List;
import java.util.Map;

/**
 * 采购信息
 *
 * @author fourforfo
 * @email fourforfo@gmail.com
 * @date 2022-06-16 12:41:34
 */
public interface PurchaseService extends IService<PurchaseEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 列出所有未被领取的采购单，即状态为新增和已分配的采购单
     * 用于合并采购需求到整单时的采购单选择
     */
    PageUtils queryPageUnReceive(Map<String, Object> params);

    /**
     * /ware/purchase/merge
     * 保存合并采购需求
     */
    void mergePurchase(PurchaseMergeVO purchaseMergeVO);

    /**
     * /ware/purchase/received
     * 领取采购单
     */
    void receivedPurchase(List<Long> purchaseIds);

    /**
     * 完成采购
     * @param purchaseDoneVO
     */
    void donePurchase(PurchaseDoneVO purchaseDoneVO);
}

